package com.h.ioc.model;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

//从配置文件中找到 person 这个关键字，和下面这个注解所管理的对象的属性进行匹配，匹配成功进行赋值
@ConfigurationProperties(prefix = "person")

@Configuration
@Data
public class Person {

    private int id;
    private String name;
    private int age;
}
